using UnityEngine;
using System.Collections;

public class CancelButton : MonoBehaviour {
	
	void Update(){
		if(THistory.Instance.canRedo()){
			gameObject.GetComponent<UIButton>().isEnabled = true;
		}else{
			gameObject.GetComponent<UIButton>().isEnabled = false;
		}
	}
	
	void OnClick(){
		THistory.Instance.redoToLast();
	}	
}
